<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="/struts-tags" prefix="s"%>

<html>

<s:include value="header.jsp" />

<body>
	<div id="container">
		<div id="header">
			<a href="http://opencities.upf.edu"><img src="images/logo.png"></a>
			<h1>Partners</h1>
		</div>

		<s:include value="menu.jsp" />

		<div id="content">
		<div id="asideleft">

				<h2>Upload</h2>
				<p>
				There are 2 ways to upload information to the platform: <b>1)</b> by filling the "Introduce the entry" field, or <b>2)</b> by uploading a file, where the supported formats are TXT, CVS, XML and JSON.</b>
				<p>
				For further information remember to visit the <a
					href="https://wikis.dtic.upf.edu/wikis/opencities">wiki</a>. <br> <br>
				<p>
					<b>Service Id:</b> the ID of the service. e.g: 1328145669919000.
				</p>
				<br>
				<p>
					<b>Password:</b> the password of the service.
				</p>
				<br>
				<p>
					<b>Source Id:</b> the source that provides the information.
				</p>
				<br>
				<p>
					<b>Unit:</b> The unit of the provided information. e.g; m2, seconds, etc.				</p>
			</div>
		<div id="asideright">
		<h2>Upload Data</h2>
		<div id="stylized" align="center">
		
<s:form id="form" action="upload" method="post" enctype="multipart/form-data" >
	
	<s:textfield name="serviceId" label="ID dataset" />
	<s:password name="password" label="Password"/>
    <s:textfield name="sourceId" label="Source ID" />
    <s:textfield name="unit" label="Unit" />
    <s:textfield name="extraInfo" label="Extra info" />
    <s:textfield name="latitude" label="Latitude" />
    <s:textfield name="longitude" label="Longitude" />
    
    <s:textarea name="entryText" label="Value" rows="5" cols="30"/>
	<s:file name="entry" label="File"/>
	
	<s:submit type="button"/>
</s:form>

<s:if test="message == 'SUCCESS'">
<div style="color: green"> Data correctly updated</div>
</s:if>

<s:elseif test="message == 'ERROR'">
<div style="color: red"> Authentication Error</div>
</s:elseif>

</div>
</div>
		</div>
		<s:include value="footer.jsp" />
	</div>
</body>
</html>